<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>易居</title>
    <link rel="stylesheet" href="../css/zlh_bootstrap.min.css">
    <link rel="stylesheet" href="../css/zlh_main.css">
    <style>
        body {
            background-color: #f5f5f5;
        }
    </style>
</head>
<body>

<nav th:replace="~{topbar::top}"></nav>
<div class="container">
    <div class="row">
        <div th:replace="~{userPage/sidebar::side}"></div>
        <div class="col-sm-10">
            <div class="user-main">
                <div class="main-right fr">
                    <div class="title">编辑个人资料</div>

                    <div class="row" style="padding-top: 20px">
                        <form class="form-horizontal" action="/user/update_user_after" method="post">
                            <input type="hidden" name="userId" th:value="${user.userId}">
                            <input type="hidden" name="createTime" th:value="${user.createTime}">
                            <input type="hidden" name="account" th:value="${user.account}">
                            <input type="hidden" name="updateTime" th:value="${user.updateTime}">
                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label">用户姓名</label>
                                <div class="col-sm-10">
                                    <input th:value="${user.userName}" name="userName" style="width: 50rem" type="text" class="form-control" id="username" placeholder="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="sex" class="col-sm-2 control-label">性别</label>
                                <div class="col-sm-10">
                                    <input th:if="${user.sex eq 1}" value="男"  readonly style="width: 50rem" type="text" class="form-control" id="sex" placeholder="">
                                    <input th:if="${user.sex eq 1}" value="1" name="sex" readonly style="width: 50rem" type="hidden" class="form-control" id="sex" placeholder="">
                                    <input th:unless="${user.sex eq 1}" value="女" readonly style="width: 50rem" type="text" class="form-control" id="sex" placeholder="">
                                    <input th:unless="${user.sex eq 1}" value="0" name="sex" readonly style="width: 50rem" type="hidden" class="form-control" id="sex" placeholder="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="telephone" class="col-sm-2 control-label">联系方式</label>
                                <div class="col-sm-10">
                                    <input th:value="${user.telephone}" name="telephone" style="width: 50rem" type="text" class="form-control" id="telephone" placeholder="">
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-sm-2 control-label">邮箱</label>
                                <div class="col-sm-10">
                                    <input th:value="${user.email}" name="email" style="width: 50rem" type="text" class="form-control" id="email" placeholder="">
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-10">
                                    <button type="submit" class="btn btn-primary">保存修改</button>
                                </div>
                            </div>
                        </form>
                    </div>

                </div>
            </div>
        </div>
    </div>
</div>

<script src="../js/jquery.min.js"></script>
<script src="../js/bootstrap.min.js"></script>
</body>
</html>